﻿@model CustomerAddressEditModel
@{
    Layout = "_ColumnsTwo";

    //title
    NopHtml.AddTitleParts(T("PageTitle.Account").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-account-page");
    NopHtml.AppendPageCssClassParts("html-address-edit-page");
}
@section left
{
    @await Component.InvokeAsync(typeof(CustomerNavigationViewComponent), new { selectedTabId = CustomerNavigationEnum.Addresses })
}
<form asp-route="@NopRouteNames.Standard.CUSTOMER_ADDRESS_EDIT" method="post">
    <div class="page account-page address-edit-page">
        <div class="page-title">
            <h1>@T("Account.MyAccount") - @T("Account.CustomerAddresses.Edit")</h1>
        </div>
        <div class="page-body">
            <div asp-validation-summary="ModelOnly" class="message-error"></div>
            @{
                var dataDictAddress = new ViewDataDictionary(ViewData);
                dataDictAddress.TemplateInfo.HtmlFieldPrefix = "Address";
                @await Html.PartialAsync("_CreateOrUpdateAddress", Model.Address, dataDictAddress)
            }
            <div class="buttons">
                <button type="submit" class="button-1 save-address-button">@T("Common.Save")</button>
            </div>
        </div>
    </div>
</form>